package com.kitten.chatglmsdk;

import com.kitten.chatglmsdk.model.ChatCompletionRequest;
import com.kitten.chatglmsdk.model.ChatCompletionResponse;
import com.kitten.chatglmsdk.model.ImageCompletionRequest;
import com.kitten.chatglmsdk.model.ImageCompletionResponse;
import io.reactivex.Single;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Path;

public interface IOpenAiApi {
    String v3_completions = "api/paas/v3/model-api/{model}/sse-invoke";

    @POST(v3_completions)
    Single<ChatCompletionResponse> completions(
            @Path("model") String model,
            @Body ChatCompletionRequest chatCompletionRequest
    );

    // 图片生成
    @POST("api/paas/v4/images/generations")
    Single<ImageCompletionResponse> getImages(@Body ImageCompletionRequest request);
}
